<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.ba{
				background-image: url(textures/background.jpg);
			}
			.bb{
				background-image: url(textures/bg_shop.png);
			}
		</style>
	</head>
	<body id="parent">
	  
		<div style=" float:left; width:100px; height:50px;">
			<input type="button" value="黑色" onclick="showdiv('contentid','showtext')" id="aa" />
		</div>
		<script language="JavaScript" type="text/JavaScript">
			function showdiv(parent){
				var parent = document.getElementById("parent");
				if (parent.className=="ba"){
					parent.className="bb";
				 } else {
					parent.className="ba"
				}
			}
		</script>
	</body>
</html>
